package cn.itcast.controller.log;

import cn.itcast.base.BaseController;
import cn.itcast.service.log.SysLogService;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@Controller
@RequestMapping(value = "/system/log")
public class SysLogController extends BaseController{

    @Autowired
    private SysLogService sysLogService;

    @RequestMapping(name = "pageHelper插件分页查询日志",value = "/list")
    public String findAll(@RequestParam(defaultValue = "1") int pageNum, @RequestParam(defaultValue = "5") int pageSize){

        PageInfo pb = sysLogService.findAll(pageNum, pageSize, company_id);
        request.setAttribute("pb",pb);
        return "system/log/log-list";
    }


}
